# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=soundtouch
pkgver=2.3.1
pkgrel=0
pkgdesc="Audio Processing library for changing Tempo, Pitch and Playback Rates"
url="http://www.surina.net/soundtouch/"
arch="all"
license="LGPL-2.0-or-later"
makedepends="autoconf automake libtool"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://codeberg.org/soundtouch/soundtouch/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname"

# secfixes:
#   2.1.2-r0:
#     - CVE-2018-17096
#     - CVE-2018-17097
#     - CVE-2018-17098

prepare() {
	default_prepare
	./bootstrap
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-shared \
		--disable-static
	make
}

package() {
	make DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/usr/doc
}

sha512sums="
c9d110b06cafb79968c94c4d206360b9ea9673d63eaf1470b097a39acf18b5b9cd53759f2656ff8963c6eee6a36fecdf1ea9aa7dc014fbf8bbee0dcfb8e4e438  soundtouch-2.3.1.tar.gz
"
